<template>
  <div>
    <h1>我是首页</h1>
    <h2>{{ this.$route.params.id }}+{{  this.$route.params.title }}</h2>
    <button @click="getmassage">点击·获取信息</button>
    <button @click="Login">回到登录页</button>
    <router-view></router-view>
  </div>
</template>
<script>
import Login from './login.vue';

export default {
    name:"HomePage",
    data() {
      return {
        massage:'',
      }
    },
    methods:{
      getmassage(){
        this.massage=this.$route.props
      },
      Login(){
        this.$router.push("/login")
      }
    },
    // props:['id','title'],
    mounted(){
    // this.$bus.age = 18;
    console.log(this.$router);
    console.log(this.$route);
  }

}
</script>

<style>

</style>